//
//  DYTrySubscribeCell.m
//  DaYing
//
//  Created by DaYing  on 2023.
//  Copyright © 2023年 DaYing . All rights reserved.
//

#import "DYTrySubscribeCell.h"

@implementation DYTrySubscribeCell

+ (id)instanceView {
    NSArray* nibView =  [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:self options:nil];
    return [nibView objectAtIndex:0];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setData:(id)data delegate:(id)delegate {
    _delegate = delegate;

    if (kUserManager.userManager.isSubscribe) {
        _yDyView.hidden = NO;
        _nDyView.hidden = YES;
    } else {
        _yDyView.hidden = YES;
        _nDyView.hidden = NO;
    }
}

- (IBAction)buttonAction:(UIButton *)sender {
    if (_delegate && [_delegate respondsToSelector:@selector(trySubscribeCell:button:)]) {
        [_delegate trySubscribeCell:self button:sender];
    }
}

@end
